class ImageConvertInfo(object):

    def __init__(self):
	self.name = None
	self.requested_image_type = None
        self.crop_type = None
	self.background_color = None
	
	self.__width = None
	self.__height = None
	
	self.__refresh_specific_cache = False
	self.__refresh_all_cache = False
	
	self.__disable_cache = False
	self.__scale_up_allowed = False
	self.__optimize_png = False

    def __repr__(self):
	return "[name: %s; resize params: %sx%s;]" % (self.name, self.width, self.height)

    def get_width(self):
	return self.__width
    
    def set_width(self, width):
        self.__width = int(width)
    
    def get_height(self):
	return self.__height
    
    def set_height(self, height):
        self.__height = int(height)

    def get_refresh_specific_cache(self):
        return self.__refresh_specific_cache
	    
    def get_refresh_all_cache(self):
        return self.__refresh_all_cache
			
    def get_disable_cache(self):
        return self.__disable_cache
				    
    def get_scale_up_allowed(self):
        return self.__scale_up_allowed
						
    def get_optimize_png(self):
	return self.__optimize_png
							    
    def set_refresh_specific_cache(self, value):
        self.__refresh_specific_cache = (False, True)[value == 'true' or value == 'True']
									
    def set_refresh_all_cache(self, value):
	self.__refresh_all_cache = (False, True)[value == 'true' or value == 'True']
										    
    def set_disable_cache(self, value):
	self.__disable_cache = (False, True)[value == 'true' or value == 'True']
												
    def set_scale_up_allowed(self, value):
        self.__scale_up_allowed = (False, True)[value == 'true' or value == 'True']
													    
    def set_optimize_png(self, value):
	self.__optimize_png = (False, True)[value == 'true' or value == 'True']

    refresh_specific_cache = property(get_refresh_specific_cache, set_refresh_specific_cache, None, None)
    
    refresh_all_cache = property(get_refresh_all_cache, set_refresh_all_cache, None, None)
    
    disable_cache = property(get_disable_cache, set_disable_cache, None, None)
    
    scale_up_allowed = property(get_scale_up_allowed, set_scale_up_allowed, None, None)
    
    optimize_png = property(get_optimize_png, set_optimize_png, None, None)    
    
    width = property(get_width, set_width)
    
    height = property(get_height, set_height)
    